import request from "@/utils/request";
/**
 * 环境控制列表
 * @param {*} data
 * @returns
 */
export function API_envList(params) {
  return request({
    url: "/env/list",
    method: "get",
    params,
  });
}

/**
 * 环境控制新增
 * @returns
 */
export function API_envCreate(data) {
  return request({
    url: "/env/create",
    method: "post",
    data,
  });
}

/**
 * 环境控制修改
 * @returns
 */
export function API_envEdit(data) {
  return request({
    url: `/env/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 环境控制删除
 * @returns
 */
export function API_envDelete(data) {
  return request({
    url: `/env/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 环境控制记录
 * @returns
 */
export function API_envGet(params) {
  return request({
    url: "/env/get",
    method: "get",
    params,
  });
}
